/**
 * Copyright (c) Huawei Technologies Co., Ltd. 2023. All rights reserved.
 * Description:
 * Author: nixiaoming
 * mail: nixiaoming@huawei.com
 * Created Time: Thu 31 Aug 2023 12:08:36 PM CST
 */
#ifndef INTERNAL_KBOX_PRINTK_H_
#define INTERNAL_KBOX_PRINTK_H_
#include <linux/printk.h>

#ifdef CONFIG_RTOS_KBOX
extern void kernel_kbox_write_text(char *text, size_t text_len, int is_newline);
#else
static inline void kernel_kbox_write_text(char *text, size_t text_len, int is_newline)
{
}
#endif

#if (defined(CONFIG_RTOS_PPC_DYING_INT) || defined(CONFIG_FIQ_GLUE)) && defined(CONFIG_RTOS_KBOX)
extern int printk_in_kbox(const char *fmt, va_list args);
extern bool being_fiq(void);
#else
static inline int printk_in_kbox(const char *fmt, va_list args)
{
	return 0;
}
static inline bool being_fiq(void)
{
	return false;
}
#endif

#endif
